package com.tj.feige.app.utils;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.kbtx.AppInstaller2;

import java.io.File;

public class e {
    public static void b(Context context, String str) {
        File file = new File(str);
        Intent intent = new Intent();
        // 修复apk安装逻辑
        if (!file.getName().endsWith(".apk")) {
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.setAction("android.intent.action.VIEW");
            intent.setDataAndType(Uri.fromFile(file), a(file));
            context.startActivity(intent);
        } else {
            AppInstaller2.installApk(file,context);
        }
    }
    public static String a(File file) {
        return null;
    }

}
